import 'package:flutter_tencent_location/controll/location_controller.dart';

import 'flutter_tencent_location_platform_interface.dart';
import 'model/location.dart';

class FlutterTencentLocation {
  Future<String?> getPlatformVersion() {
    return FlutterTencentLocationPlatform.instance.getPlatformVersion();
  }

  ///初始化
  Future<String> init(String key) async {
    return await FlutterTencentLocationPlatform.instance.init(key);
  }

  setUserAgreePrivacy() {
    FlutterTencentLocationPlatform.instance.setUserAgreePrivacy();
  }

  stopLocation() {
    FlutterTencentLocationPlatform.instance.stopLocation();
  }

  Future<Location?> getLocation(int interval) async {
    return await FlutterTencentLocationPlatform.instance.getLocation(interval);
  }

  LocationController getLocationController() {
    return FlutterTencentLocationPlatform.instance.locationController;
  }
}
